<page-bar></page-bar>

<sf *ngIf="search" mode="search" [schema]="searchSchema" (formSubmit)="st.reset($event)" (formReset)="st.reset($event)">
</sf>
<div class="d-flex justify-content-between align-items-center mb-sm mt-sm">
  <div class="d-flex align-items-center">
    <button *ngIf="auth_btn_add" (click)="addJob()" nz-button type="button" nzType="primary">新建作业</button>
    <button *ngIf="auth_btn_shutdown" (click)="shutdownJobs()" nz-button type="button" nzType="warning">暂停全部作业</button>
    <button *ngIf="auth_btn_start" (click)="startJobs()" nz-button type="button" nzType="success">发布全部作业</button>
    <button *ngIf="auth_btn_refresh" (click)="refreshJobs()" nz-button type="button" nzType="danger">重置全部作业</button>
  </div>
  <div>
    <button (click)="st.reset()" nz-button nzType="default" nzShape="circle" nz-tooltip nzTooltipTitle='刷新'><i nz-icon
        nzType="sync" nzTheme="outline"></i></button>

    <custom-column [st]="st" (ok)="st.resetColumns()" class="ml-sm"></custom-column>

    <button (click)="search = !search" nz-button nzType="default" nzShape="circle" nz-tooltip nzTooltipTitle='搜索'
      class="ml-sm">
      <i nz-icon nzType="search" nzTheme="outline"></i></button>
  </div>
</div>
<st #st [data]="url" [page]="{showSize: true}" [size]="'small'" [columns]="columns"
  [req]="{reName: { pi: 'current', ps: 'size' }}" [res]="{reName: { total: 'data.total', list: 'data.records'}}">
</st>
